-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EnableMultipleHttp2Connections
property to HttpHandlerOptions
#2126
base: develop
Are you sure you want to change the base?
Conversation
Thank you, Mohsen! Currently, there is a shortage of both unit and acceptance tests to begin the review process. We need to implement a genuine HTTP/2 + The Option acceptance test to assess the stability of Ocelot Core in this scenario. |
EnableMultipleHttp2Connections
property to HttpHandlerOptions
It is not a high priority. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My suggestions are below 👇
options.UseCookieContainer, useTracing, options.UseProxy, maxConnectionPerServer, pooledConnectionLifetime, | ||
options.EnableMultipleHttp2Connections); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly, extending the default advanced initialization constructor with all initialization values is beneficial. However, it's also worth considering the introduction of a copy constructor.
Having the copy-constructor we can write:
return new HttpHandlerOptions(options);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raman-m
How to transfer the conditions of lines 21, 24 and 25? Line 21 uses ITracer
@@ -6,14 +6,15 @@ | |||
public class HttpHandlerOptions | |||
{ | |||
public HttpHandlerOptions(bool allowAutoRedirect, bool useCookieContainer, bool useTracing, bool useProxy, | |||
int maxConnectionsPerServer, TimeSpan pooledConnectionLifeTime) | |||
int maxConnectionsPerServer, TimeSpan pooledConnectionLifeTime, bool enableMultipleHttp2Connections) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lack of copy-constructor.
@@ -22,7 +22,7 @@ public DownstreamRouteExtensionsTests() | |||
new List<DownstreamHostAndPort>(), | |||
null, | |||
null, | |||
new HttpHandlerOptions(false, false, false, false, 0, TimeSpan.Zero), | |||
new HttpHandlerOptions(false, false, false, false, 0, TimeSpan.Zero, false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not to define default constructor with default initialization values including a value for EnableMultipleHttp2Connections
which is false
?
.BDDfy(); | ||
} | ||
|
||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lack of Traits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not understand what you mean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean this
[Trait("Issue", "1833")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
- Fix code review issues
- Add unit tests
- Add acceptance tests
@RaynaldM, why did you approve the PR? It lacks new unit tests and doesn't include any acceptance tests. Additionally, the issues I raised during the code review remain unaddressed. |
d2d438c
to
a8a150e
Compare
@raman-m I don't materially have the time to explore the PRs in depth, I'm content with a surface review, more on form than substance, and so my approval is on form. |
a8a150e
to
3efc97c
Compare
If you activate HTTP/2, it is better to activate the
SocketsHttpHandler.EnableMultipleHttp2Connections
configuration as well, which gives good results.Docs